﻿using System;

namespace Flowertwig.Utils.Compression.General
{
    /// <summary>
    /// Defines the contents of the general bit flags field for an archive entry.
    /// </summary>
    [Flags]
    enum GeneralBitFlags : int
    {
        /// <summary>
        /// If set indicates that the file is encrypted
        /// </summary>
        Encrypted         = 0x0001,
        /// <summary>
        /// Two bits defining the compression method (only for Method 6 Imploding and 8,9 Deflating)
        /// </summary>
        Method            = 0x0006,
        /// <summary>
        /// If set a trailing data desciptor is appended to the entry data
        /// </summary>
        Descriptor        = 0x0008,
        Reserved          = 0x0010,
        /// <summary>
        /// If set indicates the file contains Pkzip compressed patched data.
        /// </summary>
        Patched           = 0x0020,
        /// <summary>
        /// If set strong encryption has been used for this entry.
        /// </summary>
        StrongEncryption  = 0x0040,
        /// <summary>
        /// Reserved by PKWare for enhanced compression.
        /// </summary>
        EnhancedCompress  = 0x1000,
        /// <summary>
        /// If set indicates that values in the local header are masked to hide
        /// their actual values.
        /// </summary>
        /// <remarks>
        /// Used when encrypting ht ecentral directory contents.
        /// </remarks>
        HeaderMasked      = 0x2000
    }
}